<extend name="template/base_index" />

<block name="area_header">

</block>

<block name="area_body">
    {:W('Menus/topbar')}
    <div class="admin-main container-fluid">
        {:W('Menus/left')}
        <div class="admin-main-content">
            {:W('Menus/breadcrumb')}
            <div class="table-responsive well">
                <!-- 过滤\查询按钮 -->
                <div class="filter-controls">
                    <form action="{:U('Admin/Game/search')}" class="memberForm form-inline" method="post">
                        <div class="form-group">
                            <label class="control-label">抽奖名或编号ID</label>
                            <div class="input-group">
                                <input class="form-control" type="text" name="kword" placeholder="抽奖名或ID" value="{$kword}"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">&nbsp;</label>
                            <div class="input-group">
                                <button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>查询</button>
                            </div>
                        </div>
                    </form>
                </div>
                <!-- 操作按钮 -->
                <div class="btn-controls">
                    <a class="btn btn-sm btn-primary" href="{:U('Admin/Game/add')}"><i class="fa fa-plus"></i>{:L('BTN_ADD')}</a>
                </div>

                <table class="table table-striped table table-hover  table-condensed">
                    <thead>
                    <tr>
                        <th>抽奖名</th>
                        <th>简要描述</th>
                        <th>过期时间</th>
                        <th>{:L('OPERATOR')}</th>
                    </tr>
                    </thead>
                    <tbody>
                    <empty name="list">
                        <tr>
                            <td colspan="8" class="text-center">{:L('NO_DATA')}</td>
                        </tr>
                        <else/>
<volist name="list" id="vo">
<tr>
    <td data-id="{$vo.id}">
        <a href="{:U('GamePrize/index',array('gid'=>$vo['id']))}">{$vo['name']|default='未知抽奖'}</a></td>
    <td>{$vo['desc']}</td>
    <td>{$vo['end_time']|date="Y-m-d h:i:s",###} - 【{$vo['end_time']>time() ? '进行中':'已过期'}】</td>
    <td>
        <a class="btn btn-sm btn-default" href="{:U(CONTROLLER_NAME.'/edit',array('gid'=>$vo['id']))}"><i class="fa fa-edit"  data-loading-text="{:L('BTN_EDIT')}..." ></i>{:L('BTN_EDIT')}</a>
        <a class="btn btn-sm btn-primary" href="{:U('Admin/GamePrizegethis/index',array('gid'=>$vo['id']))}"><i class="fa fa-edit"  data-loading-text="{:L('BTN_EDIT')}..." ></i>中奖记录</a>
        <a href="{:U(CONTROLLER_NAME .'/delete',array('gid'=>$vo['id']))}" class="btn btn-danger btn-sm ajax-get confirm" ><i class="fa fa-trash-o"></i> {:L('BTN_DELETE')} </a>
    </td>
</tr>
</volist>
                    </empty>
                    </tbody>
                </table>
                <div>{$show}</div>
            </div>
        </div>
        <!-- END admin-main-content -->
    </div>
    <!-- END admin-main-->
</block>

<block name="area_footer">

</block>
